﻿@using Global.Core.ExtensionMethod
@using FFLTask.SRV.ViewModel.Message
@model FromMeModel
@for (int i = 0; i < Model.Messages.Count; i++)
{
    FromMeItemModel item = Model.Messages[i];   
    <tr class="@(item.ReadTime.HasValue ? "read" : "unread")">
        <td>
            @Html.CheckBoxFor(m => m.Messages[i].Checked)
            @Html.HiddenFor(m => m.Messages[i].Id)
        </td>
        <td class="wrap_datetime">
            @item.PublishTime.ToChinese()
        </td>
        <td>
            @item.Project.GetText()
        </td>
        <td>
            @Html.ActionLink(item.Task.Title, "Edit", "Task", new { taskId = item.Task.Id.Value }, new { target = "_blank" })
        </td>
        <td class="wrap_datetime">
            @if (item.ReadTime.HasValue)
            {
                <text>@item.ReadTime.Value.ToChinese()</text>
            }
        </td>
        <td>
            @item.Addressee.Name
        </td>
        <td>
            @Html.Raw(item.Content)
        </td>
    </tr>
}